<div class="row-fluid">
    <div class="span12">
        <div class="demo-info" style="margin-bottom:10px">
            <div class="demo-tip icon-tip"></div>
            <div>
                Click on a row to select it, click again to deselect it.
                Click the New to add new row.
                Click on Edit to begin editing on a selected row.
                Click Save to save the row.
                Click on Cancel to quit changes to a row.
            </div>
        </div>

        <table id="flex" style="display:none;"></table>

        <div id="reset_modal" class="modal hide fade">
            <form class="form form-horizontal" method="post" action="" enctype="" style="margin: 0px;">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                    <h4>Reset User Password</h4>
                </div>
                <div class="modal-body">

                    <div class="control-group">
                        <label class="control-label" for="password">* New Password:</label>
                        <div class="controls">
                            <input id="password" name="password" type="text" value="" required="" class="input input-large" />
                        </div>
                    </div>
                    <input type="hidden" id="id" name="id" value="" />

                </div>
                <div class="modal-footer">
                    <button type="submit" href="<?php echo $this->Html->url(array('action' => 'users/reset_password')); ?>" id="reset_pass_btn" class="btn btn-primary">Reset Password</button>
                    <a href="#reset_modal" class="btn" data-toggle="modal" id="close-reset_pass">Close</a>
                </div>
            </form>
        </div>

    </div>
</div>

<!-- URLs -->
<input type="hidden" id="table-url" value="<?php echo $this->Html->url(array('controller' => 'Administration', 'action' => 'users/get')); ?>" />
<input type="hidden" id="table-editable-url" value="<?php echo $this->Html->url(array('controller' => 'Administration', 'action' => 'users/save')); ?>" />
<input type="hidden" id="table-delete-url" value="<?php echo $this->Html->url(array('controller' => 'Administration', 'action' => 'users/delete')); ?>" />
<input type="hidden" id="table-reset_password-url" value="<?php echo $this->Html->url(array('controller' => 'Administration', 'action' => 'users/reset_password')); ?>" />

<!-- Le Script -->
<script type="text/javascript">
    var user_level = <?php echo json_encode($user_levels); ?>;
    var user_type = <?php echo json_encode($user_type); ?>;
    var active = <?php echo json_encode($active); ?>;
</script>
<?php
echo $this->Html->script('scripts/admin/users.js');
?>
